﻿// 1.3.1.3.2. Drunken Numbers -> http://bgcoder.com/Contest/Practice/131

using System;

class DrunkenNumbers
{
    static void Main()
    {
        int n = int.Parse(Console.ReadLine());
        long[] round = new long[n];
        int vladkoScore = 0;
        int mitkoScore = 0;
        for (int i = 0; i < n; i++)
        {
            round[i] = long.Parse(Console.ReadLine());
            if (round[i] < 0)
            {
                round[i] *= -1;
            }
            int lengthI = round[i].ToString().Length;

            if (lengthI % 2 == 0)
            {
                for (int v = 0; v < lengthI / 2; v++)
                {
                    vladkoScore += (int)(round[i] % 10);
                    round[i] /= 10;
                }
                for (int m = 0; m < lengthI / 2; m++)
                {
                    mitkoScore += (int)(round[i] % 10);
                    round[i] /= 10;
                }
            }
            else
            {
                for (int v = 0; v < lengthI / 2 + 1; v++)
                {
                    vladkoScore += (int)(round[i] % 10);
                    if (v < lengthI / 2)
                    {
                        round[i] /= 10;
                    }
                    
                }
                for (int m = 0; m < lengthI / 2 + 1; m++)
                {
                    mitkoScore += (int)(round[i] % 10);
                    if (m < lengthI / 2)
                    {
                        round[i] /= 10;
                    }
                    
                }
            }
        }

        if (vladkoScore > mitkoScore)
        {
            Console.WriteLine("V {0}", vladkoScore - mitkoScore);
        }
        else if (mitkoScore > vladkoScore)
        {
            Console.WriteLine("M {0}", mitkoScore - vladkoScore);
        }
        else
        {
            Console.WriteLine("No {0}", vladkoScore + mitkoScore);
        }
    }
}
